package com.gbq.service.impl;

import com.gbq.mybatis.mapper.CarCtrlMapper;
import com.gbq.mybatis.mapper.PersonCtrlMapper;
import com.gbq.service.BaseService;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class BaseServiceImpl implements BaseService {

    @Autowired
    private PersonCtrlMapper personCtrlMapper;

    @Autowired
    private CarCtrlMapper carCtrlMapper;



    @Override
    public JSONObject selectPersonByCardno(String cardno) {

        JSONObject obj = JSONObject.fromObject(personCtrlMapper.selectByCardno(cardno));
        return obj;
    }

    @Override
    public JSONObject selectByCarno(String carno) {

        JSONObject obj = JSONObject.fromObject(carCtrlMapper.selectByCarno(carno));
        return obj;
    }


}
